import request from '@/utils/request'

// 获取点位总数
export const getPointTotal = function() {
  return request({
    url: '/api/vm-service/node/count',
    method: 'GET'
  })
}

// 获取合作商总数
export const getCooperationTotal = function() {
  return request({
    url: '/api/user-service/partner/count',
    method: 'GET'
  })
}

// 工单统计
export const getWorkOrder = function(params) {
  return request({
    url: `/api/task-service/task/taskReportInfo/${params.start}/${params.end}`,
    method: 'GET'
  })
}

// 合作商点位数Top5
export const getPieData = function() {
  return request({
    url: '/api/vm-service/node/nodeCollect',
    method: 'GET'
  })
}

export const addFileList = function(data) {
  return request({
    url: '/api/vm-service/sku/upload',
    method: 'POST',
    data

  })
}

// 获取销售前几的商品
export const getHotGoods = function({ topValue, start, end }) {
  return request({
    url: `/api/order-service/report/skuTop/${topValue}/${start}/${end}`,
    method: 'GET'
  })
}

// 销售额趋势图
export const getSellTendency = function({ collectType, start, end }) {
  return request({
    url: `/api/order-service/report/amountCollect/${collectType}/${start}/${end}`,
    method: 'GET'
  })
}

// 销售额分布
// /api/order-service/report/amountCollect/
export const getSellDistribution = function({ start, end }) {
  return request({
    url: `/api/order-service/report/regionCollect/${start}/${end}`,
    method: 'GET'
  })
}
